package com.cea.papyrus.core.preference;

import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.jface.preference.StringFieldEditor;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;

import com.cea.papyrus.core.utils.Debug;
import com.cea.papyrus.profile.Activator;
import com.cea.papyrus.profile.preference.ProfileDefinitionPreferenceConstants;

/**
 * Defines the profile definition preference page.
 */
public class ProfileDefinitionPreferencePage extends FieldEditorPreferencePage
	implements IWorkbenchPreferencePage {

	/** debug channel */
	private static final int channel = 21;

	/**
	 * Creates a new ProfileDefinitionPreferencePage.
	 */
	public ProfileDefinitionPreferencePage() {
		super(GRID);
		setPreferenceStore(Activator.getDefault().getPreferenceStore());
		setDescription("Profile Definition Preferences");
	}
	
	/**
	 * Creates the field editors.
	 */
	@Override
	public void createFieldEditors() {
		Debug.debug(this,"createFieldEditor()", channel);
		
		addField(new StringFieldEditor(ProfileDefinitionPreferenceConstants.PREF_AUTHOR_NAME, "Author:", getFieldEditorParent()));
		StringFieldEditor editor = new StringFieldEditor(ProfileDefinitionPreferenceConstants.PREF_COPYRIGHT, "Copyright:", getFieldEditorParent());
		addField(editor);
	}

	/**
	 * Init.
	 * 
	 * @param workbench the workbench
	 */
	public void init(IWorkbench workbench) {
	}
	
}